<template>
  <div class="part_container">
    <h3>区域房价排行</h3>
    <div class="title">
      <span>排行</span>
      <span>区域</span>
      <span>均价</span>
      <span>环比</span>
    </div>
    <div class="item" v-for="(item,index) in partPriceList" :key="index">
      <div class="circle" :id="index<3?'circleX':''">
        <p>{{index+1}}</p>
      </div>
      <span>{{item.part}}</span>
      <span>{{item.price}}元/㎡</span>
      <span>{{item.lrr}}</span>
    </div>
  </div>
</template>

<script>
import { defineComponent } from 'vue'
export default defineComponent({
  // props:{

  // },
  setup () {
    return {
      partPriceList: [
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        },
        {
          part: '越秀',
          price: 95000,
          lrr: '无变化'
        }
      ]
    }
  }
})
</script>

<style lang="less" scoped>
.part_container {
  display: flex;
  justify-content: center;
  align-content: center;
  flex-direction: column;
  width: 930px;
  margin-bottom: 64px;
  h3 {
    text-align: center;
    margin-bottom: 32px;
    font-family: 'HarmonyOS Sans SC';
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 28px;
    color: #333333;
  }
  .title {
    background: #e9ebed;
    height: 45px;
    line-height: 45px;
    span {
      display: inline-block;
      width: 217px;
      font-family: 'HarmonyOS Sans SC';
      font-style: normal;
      font-weight: 700;
      font-size: 14px;
      line-height: 16px;
      color: #333333;
    }
    span:first-child {
      margin-left: 30px;
    }
  }
  .item {
    display: flex;
    align-items: center;
    height: 45px;
    border: 1px solid #ededed;
    border-top: 0;
    .circle {
      margin-left: 30px;
      margin-right: 198px;
      text-align: center;
      line-height: 20px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background-color: #ececec;
      p {
        font-family: 'HarmonyOS Sans SC';
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        line-height: 20px;
        color: #666666;
      }
    }
    #circleX {
      background-color: #f56a03;
      p {
        color: #fff;
      }
    }
    span {
      display: block;
      width: 217px;
      height: 16px;
      font-family: 'HarmonyOS Sans SC';
      font-style: normal;
      font-weight: 400;
      font-size: 14px;
      line-height: 16px;
      color: #333333;
    }
  }
}
</style>
